﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using web.data.entities;
using web.bussines;
using Webdiyer.WebControls.Mvc;
using System.Web.UI;

namespace web.core.Models
{
    public class languageModels
    {
        public static int? GetLanguageIDbyUrl(string url)
        {
            //base_service baseSvc = new base_service();
            //return baseSvc.GetLanguageIDbyUrl(url);
            int? languageID = web.component.global_const.LANGUAGE_ID_DEFAULT;
            return languageID;           
        }

        public static PagedList<language> adm_lang_cate_list(int pageindex, int pagesize, int language_status)
        {
            var obj = new language_service();
            return obj.adm_lang_cate_list(pageindex, pagesize, language_status);
        }

        // add- update
        public static int adm_lang_update(language item)
        {
            var obj = new language_service();
            return obj.adm_lang_update(item);
        }
        //eable - disable language
        public static int adm_lang_enable(int language_id, byte language_status)
        {
            var obj = new language_service();
            return obj.adm_lang_enable(language_id, language_status);
        }

        //get items by id or code
        public static language getByID(int id, string lang_code)
        {
            var obj = new language_service();
            return obj.getByID(id, lang_code);
        }

        public static List<language> get_list_language()
        {
            var obj = new language_service();
            return obj.get_list_language();
        }
    }
}